﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Resources;
using System.Text;
using FireStarter.CodeGeneration.Parser;
using FireStarterModeller.Logic;
using NUnit.Framework;

namespace FireStarterModeller.Test.Logic
{
    [TestFixture]
    public class TestResourceTemplateLoader
    {

        [Test]
        public void TestLoadTemplate()
        {
            //---------------Set up test pack-------------------
            ITemplateLoader templateLoader = new ResourceTemplateLoader(typeof(ResourceTemplateLoader).Assembly, "FireStarterModeller.Logic.ClassDefXmlTemplate");

            //---------------Execute Test ----------------------
            string templateText = templateLoader.GetTemplateText("ClassDefXmlTemplateText");

            //---------------Test Result -----------------------
            Assert.IsNotEmpty(templateText);
            StringAssert.Contains("<classes>", templateText);

            //---------------Tear Down -------------------------          
        }
    }


}
